package org.appfuse.model;

import java.sql.Date;

import org.apache.commons.lang.StringUtils;


/**
 * @struts.form include-all="true" extends="org.appfuse.webapp.form.BaseForm"
 * @hibernate.class table="degreeinfo"
 */
public class Degreeinfo extends org.appfuse.model.BaseObject implements java.io.Serializable, Comparable {


    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = -6539761218642938636L;
	private Integer id;
     private String xw;
     private Date syrq;
     private String sydw;
 	private BasicInfo basicInfo;
 	private String a00;
 	private String jyfs;
 	private String xwsydwszzq;

    // Constructors

    public String getJyfs() {
		return jyfs;
	}

	public void setJyfs(String jyfs) {
		this.jyfs = jyfs;
	}

	public String getXwsydwszzq() {
		return xwsydwszzq;
	}

	public void setXwsydwszzq(String xwsydwszzq) {
		this.xwsydwszzq = xwsydwszzq;
	}

	public String getA00() {
		return a00;
	}

	public void setA00(String a00) {
		this.a00 = a00;
	}

	/** default constructor */
    public Degreeinfo() {
    }
    
    /** full constructor */
    public Degreeinfo(String xw, Date syrq, String sydw) {
        this.xw = xw;
        this.syrq = syrq;
        this.sydw = sydw;
    }

   
    // Property accessors

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }

    public BasicInfo getBasicInfo() {
		return basicInfo;
	}

	public void setBasicInfo(BasicInfo basicInfo) {
		this.basicInfo = basicInfo;
		this.a00 = basicInfo.getId();
	}

	public String getXw() {
        return this.xw;
    }
    
    public void setXw(String xw) {
        this.xw = xw;
    }

    public Date getSyrq() {
        return this.syrq;
    }
    
    public void setSyrq(Date syrq) {
        this.syrq = syrq;
    }

    public String getSydw() {
        return this.sydw;
    }
    
    public void setSydw(String sydw) {
        this.sydw = sydw;
    }

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((a00 == null) ? 0 : a00.hashCode());
		result = PRIME * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Degreeinfo other = (Degreeinfo) obj;
		if (a00 == null) {
			if (other.a00 != null)
				return false;
		} else if (!a00.equals(other.a00))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

	public int compareTo(Object o) {
		Degreeinfo theObject = (Degreeinfo) o;
		if (!StringUtils.isEmpty(theObject.getXw())) {
			return theObject.getXw().compareToIgnoreCase(this.xw);
		} else {
			return -1;
		}
	}
   








}